import { FILENAME_MUTATION, MENU_VISIBLE, SETTING_VISIBLE, BOOK_HANDLE, DEFAUTLT_FONTSIZE, DEFAULT_FAMILY, FONT_FAMILY_VISIBLE, DEFAULT_THEME } from './mutation-types'

export default {
  set_fileName({ commit }, newData) {
    return commit(FILENAME_MUTATION, newData)
  },
  set_menu_visible({ commit }, newData) {
    return commit(MENU_VISIBLE, newData)
  },
  set_setting_visible({ commit }, newData) {
    return commit(SETTING_VISIBLE, newData)
  },
  set_book_handle({ commit }, newData) {
    return commit(BOOK_HANDLE, newData)
  },
  set_default_fontSize({ commit }, newData) {
    return commit(DEFAUTLT_FONTSIZE, newData)
  },
  set_default_family({ commit }, newData) {
    return commit(DEFAULT_FAMILY, newData)
  },
  set_font_family_visible({ commit }, newData) {
    return commit(FONT_FAMILY_VISIBLE, newData)
  },
  set_default_theme({ commit }, newData) {
    return commit(DEFAULT_THEME, newData)
  }
}
